package enhance.plus.util;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author liubo
 * @created 2020-08-06 15:26
 */
@Data
@ApiModel(value="分页查询")
public class PageHelper implements Serializable {

    @ApiModelProperty(value = "每一页条数" , required = false , example = "20")
    private long size = 20L;
    @ApiModelProperty(value = "当前第几页,从0开始" , required = false , example = "0")
    private long current = 0L;

    public Page page(){
        return new Page(this.current, this.size);
    }
}
